package com.hk.commons.entity.sys;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.annotations.Index;

/**
 * 用户角色关系表
 * 
 * @author saga
 * 
 */
@Entity
@Table(name = "SysUserRoles")
public class SysUserRoles implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8213430967629790153L;

	@Id
	@Column(name = "Id", length = 20)
	private Long id;

	@Column(name = "Account", length = 20)
	@Index(name = "idx_AccRoId", columnNames = { "account", "roleId" })
	private String account;

	@Column(name = "RoleId", length = 10)
	private Long roleId;
	
	/** 创建时间 */
	@Column(name = "CreatedTS")
	private Long createdts = System.currentTimeMillis();

	/** 创建者 */
	@Column(name = "Creator", length = 10)
	private String creator;



	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	
	public Long getCreatedts() {
		return createdts;
	}

	public void setCreatedts(Long createdts) {
		this.createdts = createdts;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String account) {
		this.creator = account;
	}
	
}
